//package cj.primariaiquest.ws.endpoint;
//
//import javax.xml.transform.Source;
//
//import org.junit.Before;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.ApplicationContext;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//import org.springframework.ws.test.server.MockWebServiceClient;
//import org.springframework.xml.transform.StringSource;
//
//import static org.springframework.ws.test.server.RequestCreators.*;
//import static org.springframework.ws.test.server.ResponseMatchers.*;
//
//public class TicketServiceTest {
//
//	@RunWith(SpringJUnit4ClassRunner.class)
//	@ContextConfiguration("classpath:/spring-ws.xml")
//	public class TicketImplTest {
//
//		@Autowired
//		private ApplicationContext applicationContext;
//
//		private MockWebServiceClient mockClient;
//
//		@Before
//		public void createClient() {
//			mockClient = MockWebServiceClient.createClient(applicationContext);
//		}
//
//		@Test
//		public void ticketEndpoint() throws Exception {
//			Source requestPayload = new StringSource(
//					"<TicketRequest xmlns='http://www.primariaIquest.cj/schemas'>"
//							+ "<departmentName>HumanResources</departmentName>"
//							+ "<TicketRequest>");
//			Source responsePayload = new StringSource(
//					"<TicketResponse xmlns='http://www.primariaIquest.cj/schemas'>"
//							+ "<ticketNumber>5</ticketNumber>"
//							+ "</TicketRequest>");
//
//			mockClient.sendRequest(withPayload(requestPayload)).andExpect(
//					payload(responsePayload));
//		}
//	}
//
//}
